Compact representation of a reflectance spectrum

ABSTRACT

The invention concerns the compact representation of a reflectance spectrum of a material. For example, for in compression, identification and comparison of reflectance spectrum data of multiple materials. The compressed representation interpolating a spline curve to the reflectance spectrum data, the spline curve having a set of control points, a knot vector, and representing wavelength and reflectance as functions of an independent parameter ( 42 ). Then removing one or more knots from the knot vector that minimise a cost function in a parameter domain of the spline curve based on the wavelength function ( 44 ). Aspects of the invention include a method, software, a computer system and the compact representation itself.

TECHNICAL FIELD

The invention concerns the compact representation of a reflectance spectrum of a material. Specifically, but not limited to, the invention concerns the compression, identification and comparison of reflectance spectrum data of multiple materials. Aspects of the invention include a method, software, a computer system and the compact representation itself.

BACKGROUND ART

The term “spectra” describes the distribution of light energy across a continuous range of wavelengths. The reflectance spectrum (also known as ‘spectral signature’) of a material, which includes the proportion of light reflected from it, is a characteristic of the material.

The development of image sensor technology has made it possible to capture image data covering a broad spectrum of wavelengths. In contrast with trichromatic sensors, multispectral and hyperspectral sensing devices can acquire wavelength-indexed reflectance and radiance data in hundreds to thousands of bands across a broad spectrum. To date, these spectra are acquired and stored in discrete wavelength-indexed measurements.

As a result, the size of reflectance or radiance spectrum data is dependent upon the number of wavelengths, or spectral resolution. For high-resolution spectra, each signature can consist of hundreds of values, i.e. bands, that require large storage spaces in order to be stored.

SUMMARY OF THE INVENTION

In a first aspect the invention is a method of producing a compact representation of spectrum data of a first material, the method comprising the following steps:

-   -   (a) receiving or accessing the spectrum data comprised of pairs         of wavelength and reflectance values;     -   (b) interpolating a spline curve to the spectrum data, the         spline curve having a set of control points, a knot vector, and         representing wavelength and reflectance values as functions of         an independent parameter; and     -   (c) removing one or more knots from the knot vector that         minimise a cost function in a parameter domain of the spline         curve.

It is an advantage of the invention that the spectrum data can be represented using the set of control points and the knot vector of a spline curve. The spline curve is fitted to the spectrum data by the interpolation of step (b) so as to respect the data and step (c) reduces the number of parameters used to represent that data. In this way, the method offers a compact representation of the spectrum data that provides saving in storage space by reducing potentially thousands of samples to several control points and knots. Furthermore, the trade-off between compression ratio and representation quality is controlled by step (c). Yet further advantages include that that control points and knot vector representation is robust to changes in illumination, noise and scene geometry.

Splines are used in graphics and computer aided designs. Splines are designed and used to represent car bodies and ship hulls. These are free-form entities viewed as 3D surfaces. Spectrum data are understood as a 2D wavelength-indexed signal. Therefore, the invention represents an inventive change in viewpoint with respect to the geometric interpretation of spectral signatures.

The method may further comprise the step of:

-   -   (d) displaying the spectrum data as a spline curve based on the         control point set and the knot vector. The spline curve may be a         Non Uniform Rational B-Spline curve (NURBS).

Minimising the cost of step (c) may be based on the reflectance function. The cost function may be defined by squared differences between the spectrum data and the spline curve. That is, the cost function is based on the sum of squared differences between the reflectance value of each pair of wavelength and reflectance values, and a reflectance value given by the reflectance function for the parameter corresponding to the same wavelength value of that pair. Put another way, each wavelength corresponds to an independent parameter that is used by both the wavelength and reflectance functions. The squared differences are defined in the domain of the independent parameter, which is also called the parameter domain.

The cost function may also penalise a large number of knots.

The wavelength and reflectance functions may share the same basis functions that are based on the (i.e. same) knot vector.

The step (c) may further comprise the steps of:

-   -   (i) identifying a set of candidate removable knots;     -   (ii) determining an approximate cost reduction removing each         candidate knot will yield;     -   (iii) selecting a first knot from the set of candidate knots         that approximately yields a maximum cost reduction according to         the cost function;     -   (iv) removing the first knot from the knot vector; and     -   (v) removing a pair of wavelength and reflectance values from         the reflectance spectrum data in the locality influenced by the         removed first knot.

The method may further comprise the step of:

-   -   repeating steps (b) and (c) until the approximate cost reduction         of the removal of each remaining knot will yield is less than a         determined value, such as a value that indicates that no further         knot removal will yield a lower cost or a predetermined number         of knots.

The method may further comprise the steps of:

-   -   removing a pair of wavelength and reflectance values from the         spectrum data in the locality of a knot removed in step (c); and     -   re-sampling the spectrum data in the parameter domain and         performing step (b) and (c) on the re-sampled spectrum data.

Repetitions of (c) (ii) may comprise the steps of:

-   -   determining the approximate cost reduction of the removal of         each candidate knot will yield by updating each approximate cost         reduction by the effect the removal of the previous knot has         made.

It is an advantage of at least one embodiment of the invention that it modifies the traditional interpolation and knot removal method as an optimisation procedure. In this approach, the interpolation itself is not standard to NURBS, but a modified one that optimises the representation with respect to the goodness of fit and representation dimensionality.

The spectrum data includes raw spectral data and/or spectral images. The data may be comprised of discrete samples.

The data may be received from a hyperspectral imaging devices and spectrometers.

The method may further comprise the step of providing the compact representation to a identifier to identify a second material.

The method may further comprise producing a compact representation of reflectance spectrum of a second material by performing steps (a), (b), (c) and (d) on the spectrum data of the second material.

The method may further comprise the steps of:

-   -   when a material type of the first material is known, training an         identification algorithm to identify the material type; and     -   using the identification algorithm and the compact         representation of the second material to identify the second         material as the material type. The resolution of the spectrum         data of the first and second material may be different.

The method may further comprise comparing the spectrum data of the first and second material by comparing their respective compact representations (i.e. control point set and knot vector). The result of the comparison may be to identify the second material as being the same or different to the first material. The spectrum data of the first material may be captured by a device having a different resolution to a device that captured the reflectance spectrum data of the second material. Spectrum data acquired through different instruments are often incompatible with one another due to taking samples at differing spectral frequencies. It is an advantage of this embodiment that use of splines provides a unified mathematical basis for analyzing different reflectance spectra acquired by different instruments by common treatments. The use of splines also provides a numerically stable and efficient closed-form representation of spectra. It is also robust to noise since splines are invariant to geometric transformation and exhibit local support, which implies that local perturbations and corruption in the spectrum data do not affect the rest of the wavelength-indexed measurements.

The method may further comprise producing a compact representation of spectrum data of the first material and of spectrum data of a second material, wherein step (b) comprises interpolating spline curves to each the reflectance spectrum data of the first and second material, such that the spline curves share the knot vector, wavelength function and parameter values, and each spline curve has its own reflectance function and control points. Minimizing the cost function of step (c) may comprise minimizing for each spline curve, the sum of squared differences between the reflectance value of each pair of wavelength and reflectance values, and a reflectance value given by the reflectance function for the parameter corresponding to the same wavelength averaged over all the spectra.

A further aspect, the invention provides software, that when installed on a computer system causes it to operate in accordance with the method described above.

In yet another aspect, the invention provides a computer system to produce a compact representation of a spectrum data of a first material, the computer system comprising:

-   -   an input port to receive the spectrum data (if received);     -   a processor to perform steps (b) and (c) described above; and     -   storage means to store the set of control points and a knot         vector of the compact representation.

The processor may further operate to perform step (d) and the computer system may further comprise an output device to display the NURBS representation.

A further aspect of the invention provides a compact representation of spectrum data stored on a computer readable medium, wherein the compact representation was produced as described above.

BRIEF DESCRIPTION OF THE DRAWINGS

An example of the invention will now be described with reference to the accompanying drawings in which:

FIG. 1 is a flowchart of the method of the example;

FIG. 2 is a schematic drawing of a computer system of the example;

FIG. 3 shows Algorithm 1 which summarises the knot removal method of the example;

FIG. 4 shows Algorithm 2 shows the iterative applications of the knot removal algorithm with re-sampled data points in the parameter domain;

FIG. 5 shows the NURBS curves achieved by removing knots from the reflectance spectra of human skin;

FIG. 6 shows the NURBS curves achieved by removing knots from the reflectance spectra of a leaf; and

FIG. 7 shows Algorithm 3 which summarises the interpolation step for use with multiple reflectance spectra.

BEST MODES OF THE INVENTION

In this example a reflectance representation based on the control points resulting from the interpolation of Non-Uniform Rational B-Spline (NURBS) curves to multispectral data will be described with reference to the flowchart of FIG. 1. The interpolation is based upon a knot removal scheme in the parameter domain. Thus, we exploit the local support of NURBS so as to recover a compact form of the spectral signatures data obtained from hyperspectral imaging devices and spectrometers.

Referring now to FIG. 2, the computer system 10 used in this example to perform the method will now be described. A spectrometer 12 captures reflectance spectrum data of a leaf 14 that is in field of view of the spectrometer 12. This data is then provided to a computer 16 by direct connection to an input port (not shown) to be received 40 by the computer 16. The reflectance spectrum data is then stored on a storage medium of the computer 16, such as an external datastore 18 or internal (not shown).

The computer 16 has installed software to cause its processor to assess the stored reflectance spectrum data to perform the method shown in FIG. 2, including creating a compact representation of the data. The software also allows the processor to perform algorithm training and further analysis of the data such as comparison and identification of material as described in greater detail below.

The compact representation may replace the stored reflectance spectral data stored on the datastore 18. The NURBS may be displayed on the output device, in this case a monitor 20, of the computer system.

NURBS-Based Representation

NURBS-based representation can cope with densely sampled reflectance spectra, which could potentially consist of hundreds of data points over the visible spectrum. For purposes of classification, long feature vectors has been known to degrade performance since they incur computational cost and learning-theoretic limitations. Thus, it is desirable that the representation has the most discriminative power with the lowest possible dimensionality.

We will now describe NURBS curves and relate them to an interpolation step 42 on the spectrum. We then formulate the reflectance spectrum representation through performing knot removal 44 by minimising a cost function in the parameter domain of the spline curve.

Basic Formulation

A B-spline is a function that has support with respect to degree, smoothness and domain partition. The smoothness property makes the interpolating curve robust to noise. The local support property permits the modifications of the curve over a given wavelength range while keeping the rest of the spline unaffected.

First, we require some formalism. Since spectra are a function of wavelength λ we restrict our analysis to the two-dimensional case. A p-degree B-Spline curve C in

composed of n segments is a function in the parameter domain U of the univariate variable t given by the linear combination

$\begin{matrix} {{C(t)} = {\sum\limits_{i = 0}^{n}{{N_{i,p}(t)}P_{i}}}} & (1) \end{matrix}$ where P_(i)=(x_(i), y_(i)) are the 2D control points, and N_(i,p)(t) are the p-degree B-spline basis functions defined on the parameter domain [1]. The coordinates (x, y) of a point on the curve are expressed in the parametric form

$\begin{matrix} {{x(t)} = {\sum\limits_{i = 0}^{n}{{N_{i,p}(t)}x_{i}}}} & (2) \\ {{y(t)} = {\sum\limits_{i = 0}^{n}{{N_{i,p}(t)}y_{i}}}} & (3) \end{matrix}$

A B-Spline is characterised not only by the control points but also by a knot vector U={u₀, . . . , u_(m)}, where m=n+p+1. With these ingredients, we can define the i^(th) B-spline basis function N_(i,p)(t) of degree p as follows

${N_{i,0}(t)} = \left\{ {{\begin{matrix} 1 & {{{if}\mspace{14mu} u_{i}} \leq t \leq u_{i + 1}} \\ 0 & {otherwise} \end{matrix}{N_{i,p}(t)}} = {{\frac{t - u_{i}}{u_{i + p} - u_{i}}{N_{i,{p - 1}}(t)}} + {\frac{u_{i + p + 1} - t}{u_{i + p + 1} - u_{i + 1}}{N_{{i + 1},{p - 1}}(t)}}}} \right.$

Note that the basis function N_(i,p)(t) is a piecewise polynomial assuming non-zero values only on the interval [u_(i), u_(i+p+1)). Note that the basis function only affects the shape of the spline in a local section governed by the parameter t.

To formulate the representation, we treat a spectrum as a collection of spectral samples with two coordinates (λ_(k), R_(k)), where R_(k) is the k^(th) reflectance sample at the wavelength λ_(k). Thus, the parametric form of a B-spline curve through these data points is obtained by representing the wavelength and reflectance as two functions of t which we denote λ(t) and

(t) respectively. The representation is then governed by a knot vector and a control point-set which minimise a cost function defined by squared differences between the measured reflectance R_(k) and the one computed in the parameter domain

(t). We depart from an initial interpolation of the sampled reflectance spectrum so as to arrive at the curve that minimises the cost function through a knot removal algorithm.

Once the control points and knot vector that minimise the cost function are at hand, we proceed to construct 46 the NURBS representation. We do this by selecting the most discriminative components from the control point-set and the knot vector U. We observe that the knots and x-coordinates of each control point, i.e. the x_(i) variables in Equation 2, vary in a specific neighbourhood of the parameter domain where they govern the support of the NURBS. This is reflected in the wavelength domain and, therefore, their variations across the spectra may not be as related to the spectrum shape as the y-coordinates of the control points, i.e. the y_(i) variables in Equation 3. In other words, the variations in the y coordinates of the control points primarily determine the general shape of the spectrum.

Directed Interpolation

As mentioned earlier, in statistical learning, a representation is desired to retain statistical information that gives high discriminative power. Hence, we devise a target function to optimise the choice of the interpolating B-spline curve 42 for each reflectance spectrum. Given a surface with reflectance R_(k) at each wavelength {λ_(k)}, k=1, . . . , l, we aim to recover an interpolating curve C with control points P_(i)=(x_(i), y_(i)) and a knot vector U satisfying the following'parametric form

${\lambda(t)} = {\sum\limits_{i = 0}^{n}{{N_{i,p}(t)}x_{i}}}$ ${\Re(t)} = {\sum\limits_{i = 0}^{n}{{N_{i,p}(t)}y_{i}}}$

The cost of interpolating the points (λ_(k), R_(k)) using the B-spline curve above is then given by

$\begin{matrix} {K = {{\alpha{\sum\limits_{k = 1}^{1}\left( {{\Re\left( t_{k} \right)} - R_{k}} \right)^{2}}} + {\left( {1 - \alpha} \right){U}}}} & (6) \end{matrix}$ where |•| denotes the length of the vector argument and α is a constant between zero and unity. The domain parameter t_(k)εU corresponds to the k^(th) wavelength, i.e. λ_(k)=λ(t_(k))

Note that the first term in Equation 6 above is the weighted sum of squared errors in the 2D space defined by the wavelength-reflectance pairs, whereas the second term is the weighted number of knots. Thus, the optimal interpolating curve minimises the sum of squared distances (

(t_(k))−R_(k))², while penalising a large number of knots. This imposes a balance in the resulting curve between describing the general shape of the reflectance data, while minimising the number of knots required to describe it. This trade-off is governed by α. A small value of α favours a short representation over one that respects the general shape of the original data. Also, note that, as the number of knots decreases, the interpolating curve becomes smoother. Thus, an appropriate choice of α makes the representation less susceptible to noise while preventing over-smoothing and loss of detail.

Minimisation of the Cost Function

The knot removal 44 aims at minimising the interpolation cost introduced in Equation 6. We depart from an initial approximation of the NURBS curve to the reflectance spectrum under study. To this end, we apply the curve interpolation algorithm in [1], which employs the centripetal method of Lee [2] to recover parameter values for every control point.

With this initial approximation at hand, we proceed to remove knots sequentially using a knot removal method akin to that in [3]. The algorithm is a two-pass process. In the first pass, removable knots are identified. In the second pass, knots are sequentially removed and new control points are computed. Although being effective, this algorithm does not automatically determine the best knot to remove at each pass, but rather assumes the knot to be removed to be designated as input. The knot removal algorithm of this example computes the potential cost reduction for removable knots. Once these knots and their contributions to the cost function are at hand, we employ Tiller's algorithm [3] to remove them.

Thus, our algorithm selects amongst the candidate knots the one that yields the maximum cost reduction. Also, note that, following the strategy above, the parameter t_(k) should be recovered for every wavelength λ_(k). This is not a straightforward task since the function λ(t_(k)) is expressed as a linear combination of the basis functions N_(i,p) given in Equation 4. Nonetheless, this equation may not be solved analytically, we adopt a numerical approach in order to find an approximate solution and reduce the computational cost involved. In fact, it is reasonable to assume that the wavelength λ(t_(k)) is an increasing function in the parameter domain. Therefore, for a given wavelength λ_(k), we can perform a binary search for t_(k) such that λ_(k)˜λ(t_(k)).

Implementation

The knot removal process 44 is an iterative method in which, at every iteration, we locate the knot that maximises the reduction in the cost K. The knot removal algorithm is summarised in Algorithm 1, where the sum of squared errors before and after knot removal are denoted as SSE_(old) and SEE_(new), respectively. The RemoveKnot(•) procedure implements the knot removal algorithm in [3].

As a result of the local support property of B-spline curves, the removal only affects the curve partition in the neighbouring sections of the knot. Thus, for the sake of efficiency, the change in sum of squared errors can be computed as the change within the neighbourhood of the removal candidate u to profit from the local support of the NURBS. To do this, we use the span of the NURBS [1] and employ lists to back-track their effect across the spline.

The knot removal algorithm terminates when removing any knot cannot further reduce the interpolation cost. However, the number of knots should be imposed as a hard constraint since representations should be normalised in length before they are input to classifiers. Hence, the knot removal method in Algorithm 1 of FIG. 3 is applied recursively by resampling data points in the parameter domain. The pseudocode for the recursion on the knot removal algorithm is shown in Algorithm 2 of FIG. 4. The resampling operation allows further knots to be removed by reducing the number of curve sections without changing the distribution of the control points from the original data. Note that smoothing becomes most acute when the parameter values for the resampling operation are given by the midpoints of the knot spans. Thus, we sample parameter values near the resulting knots to preserve the shape of the original curve.

FIG. 5 shows the resulting NURBS curves (continuous line) achieved by removing knots from the reflectance spectra (shown as dots) of human skin and FIG. 6 a leaf. The original reflectance data are sampled every 4 nm. In these figures, we have performed, iterative knot removal with B-Spline basis functions of degree 3. This yielded 34 knots and 30 control points per curve. Note that, while this number of knots is considerably less than the number of original data points, the resulting NURBS curve still aligns well with the original data as can be seen by the lack of two visibly different curves in FIGS. 5 and 6. Thus, our cost-optimal knot removal algorithm is able to perform dimensionality reduction while respecting the global shape of the reflectance spectra. This is evident throughout the whole spectrum between 400 and 750 nm.

The NURBS-based representation provides a means to compression and efficient storage of spectral data, such as location-wise reflectance spectra measured by spectrometers and hyperspectral images captured by hyperspectral sensors. The most straightforward option here is to denote the quality factor as

$\beta = \frac{1}{\alpha}$ and store the control points and knot vectors as an alternative to the raw spectra.

A further example if the invention will now be described that concerns producing a compact representation of reflectance data of two materials.

In pattern recognition and image coding, the data under study is commonly represented by compact features that rely on a common basis. Motivated by this goal, we propose a NURBS-based representation for a given collection of reflectance spectra that is compact in the spectral domain. The purpose of this representation is threefold. Firstly, it provides a common B-spline basis to represent and compare reflectance spectra of different materials, possibly captured by heterogeneous sensing devices. The continuity, differentiability and local support properties of these basis functions enables further functional analysis of spectral signatures. Secondly, it allows the recognition of materials based on compact spline features. Thirdly, it facilitates the compression of hyperspectral images through the reduction in the spectral domain.

The formulation of the NURBS-based descriptor in this case is built on that for a single spectrum. Furthermore, subject to the motivation above, it is required that all the reflectance spectra under study are represented by the same B-spline basis functions N_(i,p)(t), i=0, . . . , n. This implies that, for a collection of spectra signatures sampled in the same wavelength range, their NURBS-based representations share the same knot vector and parameter values corresponding to the wavelengths.

Suppose that we are given a collection of reflectance spectra R_(v)=[R_(v,1), R_(v,2), . . . , R_(v,l)]^(T), where v denotes the spectrum index (or pixel index in case of hyperspectral images) and R_(v,k) is the measured reflectance of the spectrum v at the wavelength {λ_(k)}, k=1, . . . , l. Treating each reflectance spectrum as a set of points with two coordinates made up of reflectance-wavelength pairs, we aim to recover a B-spline curve for each spectrum such that they share the same basis functions, knot vector and control points in the wavelength dimension. The feature that distinguishes between spectra is the control points in the reflectance dimension.

Formally, the problem is formulated as follows. For the spectrum index v, we aim to

$\begin{matrix} {{\lambda(t)} = {\sum\limits_{i = 0}^{n}{{N_{i,p}(t)}x_{i}}}} & (7) \\ {{\Re_{v}(t)} = {\sum\limits_{i = 0}^{n}{{N_{i,p}(t)}y_{v,i}}}} & (8) \end{matrix}$ recover a B-spline curve C_(v) with control points P_(v,i)=(x_(i), y_(v,i)), i=0, . . . , n. and a knot vector U common for all the spectra. The coordinates of this curve are defined as functions of an independent parameter t as

Note that in Equations 7 and 8, the basis functions N_(i,p)(t) and the wavelength interpolation function λ(t) are the same for all the given spectra. In contrast, the reflectance interpolation function R_(v)(t) and its associated control point coordinates y_(v,i) vary with the spectral signature. Thus, the representation of a collection of spectral signatures effectively consists of the knot vector U, the control points' wavelength coordinates [x_(o), . . . , x_(n)]^(T) and the control points' reflectance coordinates [y_(v,o), . . . , y_(v,n)]^(T) corresponding to the given spectral signatures.

In principle, a common function basis for all the spectra can be achieved as follows. The common knot vector and the independent parameter value t^(k) are computed as the average of those of individual spectra, over all the spectra or the spatial dimensions of a hyperspectral image. This operation can be performed in the global interpolation steps in Lines 1 and 22 of Algorithm 1 of FIG. 3.

Algorithm 3 of FIG. 7 provides a procedure to interpolate the given collection of reflectance spectra by a number of B-Spline curves sharing the same knot vector, basis functions and control points in the wavelength dimension.

The flow of Algorithm 3 is described as follows. First, we employ the centripetal method (in Lines 4-7) by Lee [2] to compute parameter values t _(v,k) separately for each reflectance spectrum. Note that we can employ any other methods to compute these parametric values as an alternative to the centripetal method. After obtaining the average t^(k) of these parameter values across all the spectral signatures, the common knot vector is computed in Lines 9-11. In addition, the FindSpan(l, p, t_(k), U) procedure in Line 14 obtains the knot span index of t^(k) using a binary search method. Subsequently, the BasisFunctions(span, t_(k), p, U) procedure in Line 15 evaluates the basis functions at the parametric point t^(k). The control point coordinates are solutions to the linear equations presented in Lines 17 and 19.

Next we formulate the cost of interpolating the curves above through the set of wavelength-indexed reflectance spectra R_(v)=[R_(v,1), R_(v,2), . . . , R_(v,l)]^(T). Suppose that the parameter t_(k)εU corresponds to the k^(th) wavelength, i.e. λ_(k)=λ(t_(k))∀k, the interpolation cost using the B-spline curves above is then given by

$\begin{matrix} {K = {{\alpha\frac{1}{N}{\sum\limits_{v}{\sum\limits_{k = 1}^{1}\left( {{\Re_{v}\left( t_{k} \right)} - R_{v,k}} \right)^{2}}}} + {\left( {1 - \alpha} \right){U}}}} & (9) \end{matrix}$ where N is the number of spectral signatures, |.| denotes the length of the vector argument and α is a constant between zero and unity.

The cost function in Equation 9 only differs from that in Equation 6 in the first term, which is the weighted sum of squared errors in the 2-dimensional space of wavelength-reflectance pairs, averaged over all the spectra. Therefore, as long as we enforce a common knot vector across all the spectral signatures (or across the spatial dimension of a hyperspectral image), this cost function can also be minimised using the same knot removal procedures in Algorithms 1 and 2.

In principle, a common function basis for all the spectra can be achieved as follows. The common knot vector and the independent parameter value t_(k) are computed as the average of those of individual spectra, over all the spectra or the spatial dimensions of a hyperspectral image. Furthermore, this operation can be performed in the global interpolation steps in Lines 1 and 22 of Algorithm 1.

The NURBS-based representation provides a means to compression and efficient storage of spectral data and imagery. As described in above, the most straightforward option here is to store the control points and knot vector as an alternative to the raw spectra.

This approach leads to a great reduction in storage. Suppose that we have N spectral signatures in l bands. The number of elements required to store each spectra is n, where n is the number of control points, instead of the number of bands. In addition, the cost to store the knot vector (containing n+p+1 elements, where p is the degree of the basis functions) and the control points' wavelength coordinates (containing n elements), which are common to all the spectra, is negligible. Therefore, the compression ratio is roughly

$\frac{n}{l}.$ For instance, for a hyperspectral camera delivering hundreds of bands, the storage is reduced from hundreds of bands to tens of them, resulting in about ten times of storage reduction.

The method also permits the interpolation of spectra acquired through sensing devices of different spectral resolutions. This is important since recognition, detection and analysis of materials through hyperspectral sensing is often based upon spectrometers and cameras whose resolution can vary greatly. The interpolation of spectral data through our NURBS-based representation permits spectral signatures to be abstracted to a set of continuous basis functions whose support is local in nature. Thus, a signature acquired through a spectrometer, with, for instance, a spectral resolution of 1 nm can be interpolated in a continuous domain to spectra arising from cameras whose resolution is in the order of 10 nm.

Also, supervised recognition and detection algorithms can be trained on high-resolution spectral signatures and then applied to low-resolution spectral imagery. In a similar fashion, spectra may be operated upon in a continuous domain, where derivative analysis [4] can be effected in a closed, computationally efficient manner.

It will be appreciated by persons skilled in the art that numerous variations and/or modifications may be made to the invention as shown in the specific embodiments without departing from the scope of the invention as broadly described.

For example, the interpolation step can be modified to fix the knots and x-coordinates of the control points, which correspond to the wavelength in the spectra. This will further reduce the overhead of storing redundant wavelength information across image pixels, thus will improve the compression ratio.

The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive.

REFERENCES

-   [1] Les Piegl and Wayne Tiller. The NURBS book. Springer-Verlag,     London, UK, 1995. -   [2] E. T. Y. Lee. Choosing nodes in parametric curve interpolation.     Computer-Aided Design, 21(6):363-370, 1989. -   [3] Wayne Tiller. Knot-removal algorithm for NURBS curves and     surfaces. Computer-Aided Design, 24(8):445-453, 1992. -   [4] Z. Fu, A. Robles-Kelly, T. Caelli, and R. Tan. On Automatic     Absorption Detection for Imaging Spectroscopy: A Comparative Study.     IEEE Transactions on Geoscience and Remote Sensing, 45:3827-3844,     2007. 

Claims defining the invention are as follows:
 1. A computer implemented method of producing a compact representation of spectrum data, utilizing a processor to perform the following steps: (a) receiving or accessing the spectrum data comprised of pairs of wavelength and reflectance values; (b) interpolating a spline curve to the spectrum data, the spline curve having a set of control points, a knot vector, and representing wavelength values as a first function of an independent parameter and representing reflectance values as a second function of the same independent parameter; and (c) removing one or more knots from the knot vector that minimize a cost function in a parameter domain of the spline curve.
 2. The method of claim 1, wherein the spline curve is a Non Uniform Rational B-Spline curve (NURBS).
 3. The method of claim 1, wherein the minimizing the cost of step (c) is based on the reflectance function.
 4. The method of claim 1, wherein the cost, function is defined by squared differences between the spectrum data and the spline curve.
 5. The method of claim 4, wherein the cost function is based on the squared differences between the reflectance value from a pair of wavelength and reflectance values, and a reflectance value given by the second function for an independent parameter value that corresponds to the same wavelength value of that pair.
 6. The method of claim 5, further comprising the step of determining the independent parameter value that corresponds to the same wavelength value of that pair by performing a search over the first function.
 7. The method according to claim 4, wherein the cost function penalizes an increasing number of knots.
 8. The method of claim 1, wherein the wavelength and reflectance functions share the same basis functions that are based on the knot vector.
 9. The method according to claim 1, wherein step (c) comprises the steps of: (i) identifying a set of candidate removable knots; (ii) determining an approximate cost reduction removing each candidate knot; (iii) selecting a first knot from the set of candidate knots that approximately yields a maximum cost reduction according to the cost function; (iv) removing the first knot from the knot vector; and (v) removing a pair of wavelength and reflectance values from the spectrum data in the locality influenced by the removed first knot.
 10. The method according to claim 9, further comprising: removing a pair of wavelength and reflectance values from the spectrum data in the locality of a knot removal in step (c); re-sampling the spectrum data in the parameter domain and preferring steps (b) and (c) on the re-sampled spectrum data; and determining the approximate cost reduction the removal of each candidate knot will yield by updating each approximate cost reduction by the effect the removal of the previous knot has made.
 11. The method according to claim 1, wherein the method further comprises: removing a pair of wavelength and reflectance values from the spectrum data in the locality of a knot removed in step (c); and re-sampling the spectrum data in the parameter domain and performing step (b) and (c) on the re-sampled spectrum data.
 12. The method according to claim 1, wherein reflectance spectrum data is received from a hyperspectral imaging devices and/or spectrometers.
 13. The method according to claim 1, wherein the method further comprises the step of providing the compact representation of spectrum data of a first material to an identifier for use in identifying a second material.
 14. The method according to claim 1, wherein the method further comprises: repeating the method to produce a compact representation of spectrum data of a second material; comparing the compact representation of spectrum data of a first and a second material to identify the second material as being the same or different to the first material.
 15. The method according to claim 1, wherein the reflectance spectrum of the first material is captured by a device having a different resolution to a device that captured the spectrum data of the second material.
 16. The method according to claim 1, wherein the method produces a compact representation of spectrum data of a first material and of spectrum data of a second material, wherein step (b) comprises interpolating spline curves to each of the spectrum data, such that the spline curves share the knot vector, wavelength function and parameter values, and each spline curve has its own reflectance function and control points.
 17. The method according to claim 16, wherein minimizing the cost function of step (c) comprises minimizing for each spline curve, minimizing the sum of squared differences between the reflectance value of each pair of wavelength and reflectance values, and a reflectance value given by the reflectance function for the parameter corresponding to the same wavelength averaged over all the, spectra.
 18. A non-transitory computer-readable medium having computer-readable instructions, when installed on a computer system cause it to operate in accordance with the method of claim 1 to produce a compact representation of spectrum data.
 19. A computer system to produce a compact representation of a spectrum of a first material, the computer system comprising: a processor to perform steps (a), (b) and (c) of claim 1; and storage means to store the set of control points and a knot vector of the compact representation.
 20. The method of claim 1, wherein the spectrum data is in the form of a spectral signature comprised of wavelength-indexed data representative of reflectance and/or radiance.
 21. The method of claim 1, wherein each of the pairs of wavelength and reflectance values comprises a wavelength value from which the wavelength may be ascertained and a reflectance value from which a reflectance may be ascertained. 